from sqlalchemy import Column, Integer, String, Text, DateTime, func,Boolean
from database import Base


class CommandModel(Base):
    __tablename__ = "t_command"

    id = Column(Integer, primary_key=True, autoincrement=True, comment="主键ID")
    command = Column(String(255), nullable=False, unique=True, comment="命令")
    description = Column(Text, nullable=True, comment="命令描述")
    status = Column(Boolean, default=False, comment="是否启用")
    created_at = Column(DateTime, server_default=func.now(), comment="创建时间")
    updated_at = Column(DateTime, server_default=func.now(), onupdate=func.now(), comment="更新时间")
